package com.ccys.db.mapper;

import com.ccys.db.dto.doctor.pendToConsult.GetDoctorTBTCAppointmentListDto;
import com.ccys.db.entity.TblBookingConsultation;
import com.ccys.db.vo.doctor.pendingToConsult.GetDoctorTBTCAppointmentListVo;
import com.ccys.db.vo.doctor.pendingToConsult.GetIncomingPatientVo;
import com.ccys.db.vo.doctor.pendingToConsult.GetWaitingForApprovingConsultationsVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
* Created by Mybatis Generator on 2023/12/23
*/
public interface TblBookingConsultationMapper extends Mapper<TblBookingConsultation>, MySqlMapper<TblBookingConsultation> {
    TblBookingConsultation findByBookingId(@Param("bookingId") String bookingId);

    void updateByDateAndUtcDateAndBookingId(@Param("date") Date date,@Param("utcDate") Date utcDate,@Param("bookingId") String bookingId);

    BigDecimal findSumAmountByBookingId(@Param("bookingId") String bookingId);

    Date getConsultantBeginDate(String bookingId);


    /**
     *
     * @param dto 有两个接口逻辑一样，只是查询条件不一样，用type来区分
     * @return appointmentList
     */
    List<GetDoctorTBTCAppointmentListVo> getDoctorTBTCAppointmentList(GetDoctorTBTCAppointmentListDto dto);

    void updateTimeByBooking(@Param("date") Date date,@Param("utcDate") Date utcDate,@Param("bookingId") String bookingId);

    GetIncomingPatientVo getIncomingPatient(String doctorId);

    List<GetWaitingForApprovingConsultationsVo.BookingVo> getWaitingForApprovingConsultations(String pc, String dc);

    Date getCheckPassConsultants(String doctorId,String memberId);
}
